package com.hera.process.config.service.impl;

import java.util.List;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.hera.base.util.FiltroDTO;
import com.hera.process.config.dao.TaskInstanceCacheDao;
import com.hera.process.config.service.TaskInstanceCacheService;
import com.hera.process.workflow.domain.TaskInstanceCache;


@Service("Taskinstancecacheservice")
public class TaskInstanceCacheServiceImpl implements TaskInstanceCacheService{

	static final Logger logger = Logger.getLogger(CalendarServiceImpl.class);
	
	@Autowired
	private TaskInstanceCacheDao taskinstancecachedao;
	
	@Override
	public TaskInstanceCache findById(String id) {
		
		return taskinstancecachedao.findOne(id);
	}

	@Override
	public void update(TaskInstanceCache entity) {
		
		taskinstancecachedao.save(entity);
	}

	@Override
	public void save(TaskInstanceCache entity) {
		
		taskinstancecachedao.save(entity);
	}

	@Override
	public void delete(TaskInstanceCache entity) {
		
		taskinstancecachedao.delete(entity);
	}

	@Override
	public List<TaskInstanceCache> findAll() {
		
		return taskinstancecachedao.findAll();
	}

	@Override
	public List<TaskInstanceCache> findAll(FiltroDTO filtroDTO) {
		
		return taskinstancecachedao.obtenerEntidadesPorFiltros(filtroDTO);
	}

}
